package com.huayi.breakpoint_continuation_interface.utils;

import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;

/**
 * @Description :判断是否为JSON的工具类
 * @Author:yujiahao
 * @Date: 2022/5/18 11:27
 * @Version: 1.0
 */
public class JSONUtil {

    public static boolean isJSON(String log) {
        boolean flag = false;
        try {
            JSONObject.parseObject(log);
            flag = true;
        } catch (JSONException e) {
            System.out.println("JSON解析异常");
        }
        return flag;
    }
}
